home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_300 / 395_01 / avl / align.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-30  |  370 b   |  15 lines

  1. #if !defined(ALIGN_H)
  2. #define ALIGN_H
  3.  
  4. /* data type whose address can be the starting address of any
  5.    other data type */
  6. typedef short int ALIGN_TYPE;
  7.  
  8.  
  9. /* number of elements in an array of ALIGN_TYPE large enough to
  10.    hold a data structure of a given size */
  11. #define N_ALIGN_UNITS(SZ) \
  12.   (((SZ) + sizeof(ALIGN_TYPE) - 1) / sizeof(ALIGN_TYPE))
  13.  
  14. #endif
  15.